import tensorflow as tf
config = tf.compat.v1.ConfigProto(allow_soft_placement=True)
config.gpu_options.per_process_gpu_memory_fraction = 0.95

sess = tf.compat.v1.keras.backend.set_session(tf.compat.v1.Session(config=config))
a = tf.constant(1)
b = tf.constant(2)

